/*
package com.tongtech.space.common.configs;

import com.baomidou.mybatisplus.core.MybatisConfiguration;
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean;
import org.apache.ibatis.logging.stdout.StdOutImpl;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.type.JdbcType;
import org.mybatis.spring.SqlSessionTemplate;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.jdbc.DataSourceBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;

import javax.sql.DataSource;

*/
/**
 * sh_space 主数据源配置
 *
 * @author jinjiayu
 * @since 2020/8/20
 *//*

@Configuration
@MapperScan(basePackages = {"com.tongtech.space.mapper.space"}, sqlSessionFactoryRef = "spaceSqlSessionFactory")
public class DataSourceSpaceConfig {
    @Autowired
    private PaginationInterceptor paginationInterceptor;

	@Primary
    @Bean(name = "spaceDataSource")
    @ConfigurationProperties("spring.datasource.space")
    public DataSource spaceDataSource(){
        return DataSourceBuilder.create().build();
    }
 
    @Bean(name = "spaceSqlSessionFactory")
    public SqlSessionFactory sqlSessionFactory(@Qualifier("spaceDataSource") DataSource dataSource) throws Exception {
        MybatisSqlSessionFactoryBean sessionFactoryBean = new MybatisSqlSessionFactoryBean();
        sessionFactoryBean.setDataSource(dataSource);
        sessionFactoryBean.setMapperLocations(new PathMatchingResourcePatternResolver()
                .getResources("classpath*:/mapper/space/*.xml"));
        sessionFactoryBean.setPlugins(paginationInterceptor);


*/
/*        // 导入mybatis配置
        MybatisConfiguration configuration = new MybatisConfiguration();
        configuration.setJdbcTypeForNull(JdbcType.NULL);
        configuration.setMapUnderscoreToCamelCase(true);
        configuration.setCacheEnabled(false);
        // 配置打印sql语句
        configuration.setLogImpl(StdOutImpl.class);
        sessionFactoryBean.setConfiguration(configuration);*//*


        return sessionFactoryBean.getObject();
    }

    @Bean("spaceSqlSessionTemplate")
    public SqlSessionTemplate matterSqlSessionTemplate(
            @Qualifier("spaceSqlSessionFactory") SqlSessionFactory sqlSessionFactory) {
        return new SqlSessionTemplate(sqlSessionFactory);
    }

}
*/
